package mws;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

public class ExceptionHandler implements RejectedExecutionHandler {

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {

        // 怎么样的 拒绝 策略 比较好

        System.out.println("Exception in thread " + Thread.currentThread().getName() + " " + r);
    }


}
